
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>vue-router · Aivin开发笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Aivin">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-local-video/video-js.min.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="vue-i18n.html" />
    
    
    <link rel="prev" href="Vuex.html" />
    

    
        <link rel="shortcut icon" href='../../assets/images/favicon.ico' type="image/x-icon">
    
    
        <link rel="bookmark" href='../../assets/images/favicon.ico' type="image/x-icon">
    
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    个人信息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="友情链接.html">
            
                <a href="友情链接.html">
            
                    
                    友情链接
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="js.html">
            
                <a href="js.html">
            
                    
                    web前端
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="html5.html">
            
                <a href="html5.html">
            
                    
                    html5
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="js.html">
            
                <a href="js.html">
            
                    
                    js
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="css.html">
            
                <a href="css.html">
            
                    
                    css
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="JSX.html">
            
                <a href="JSX.html">
            
                    
                    JSX
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="CommonJS.html">
            
                <a href="CommonJS.html">
            
                    
                    CommonJS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="ES6.html">
            
                <a href="ES6.html">
            
                    
                    ES6
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="mockjs.html">
            
                <a href="mockjs.html">
            
                    
                    mockjs
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="ESLint.html">
            
                <a href="ESLint.html">
            
                    
                    ESLint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="alias.html">
            
                <a href="alias.html">
            
                    
                    alias
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.10" data-path="vueJS.html">
            
                <a href="vueJS.html">
            
                    
                    vueJS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.11" data-path="Vuex.html">
            
                <a href="Vuex.html">
            
                    
                    Vuex
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3.12" data-path="vue-router.html">
            
                <a href="vue-router.html">
            
                    
                    vue-router
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.13" data-path="vue-i18n.html">
            
                <a href="vue-i18n.html">
            
                    
                    vue-i18n
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.14" data-path="element.html">
            
                <a href="element.html">
            
                    
                    element
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.15" data-path="iview.html">
            
                <a href="iview.html">
            
                    
                    iview
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.16" data-path="test.html">
            
                <a href="test.html">
            
                    
                    test
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >vue-router</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon "></span><a href="#vue-router"><b>1. </b>Vue Router</a></li><ul><li><span class="title-icon "></span><a href="#vue-router&#x914D;&#x7F6E;&#x9009;&#x9879;"><b>1.1. </b>vue-router&#x914D;&#x7F6E;&#x9009;&#x9879;</a></li><ul><li><span class="title-icon "></span><a href="#router-view"><b>1.1.1. </b>router-view</a></li><li><span class="title-icon "></span><a href="#router-link"><b>1.1.2. </b>router-link</a></li><li><span class="title-icon "></span><a href="#routes"><b>1.1.3. </b>routes</a></li><li><span class="title-icon "></span><a href="#app"><b>1.1.4. </b>app</a></li><li><span class="title-icon "></span><a href="#name"><b>1.1.5. </b>name</a></li><li><span class="title-icon "></span><a href="#path"><b>1.1.6. </b>path</a></li><li><span class="title-icon "></span><a href="#redirect"><b>1.1.7. </b>redirect</a></li><li><span class="title-icon "></span><a href="#router"><b>1.1.8. </b>router</a></li><li><span class="title-icon "></span><a href="#mode"><b>1.1.9. </b>mode</a></li><li><span class="title-icon "></span><a href="#base"><b>1.1.10. </b>base</a></li><li><span class="title-icon "></span><a href="#linkactiveclass"><b>1.1.11. </b>linkActiveClass</a></li><li><span class="title-icon "></span><a href="#linkexactactiveclass"><b>1.1.12. </b>linkExactActiveClass</a></li><li><span class="title-icon "></span><a href="#scrollbehavior"><b>1.1.13. </b>scrollBehavior</a></li><li><span class="title-icon "></span><a href="#parsequery--stringifyquery"><b>1.1.14. </b>parseQuery / stringifyQuery</a></li><li><span class="title-icon "></span><a href="#fallback"><b>1.1.15. </b>fallback</a></li><li><span class="title-icon "></span><a href="#currentroute"><b>1.1.16. </b>currentRoute</a></li><li><span class="title-icon "></span><a href="#push-&#x3001;--replace-&#x3001;go-&#x3001;-back-&#x3001;-forward"><b>1.1.17. </b>push &#x3001;  replace &#x3001;go &#x3001; back &#x3001; forward</a></li><li><span class="title-icon "></span><a href="#getmatchedcomponents"><b>1.1.18. </b>getMatchedComponents</a></li><li><span class="title-icon "></span><a href="#resolve"><b>1.1.19. </b>resolve</a></li><li><span class="title-icon "></span><a href="#addroutes"><b>1.1.20. </b>addRoutes</a></li><li><span class="title-icon "></span><a href="#onready"><b>1.1.21. </b>onReady</a></li><li><span class="title-icon "></span><a href="#onerror"><b>1.1.22. </b>onError</a></li><li><span class="title-icon "></span><a href="#params"><b>1.1.23. </b>params</a></li><li><span class="title-icon "></span><a href="#query"><b>1.1.24. </b>query</a></li><li><span class="title-icon "></span><a href="#hash"><b>1.1.25. </b>hash</a></li><li><span class="title-icon "></span><a href="#fullpath"><b>1.1.26. </b>fullPath</a></li><li><span class="title-icon "></span><a href="#matched"><b>1.1.27. </b>matched</a></li><li><span class="title-icon "></span><a href="#redirectedfrom"><b>1.1.28. </b>redirectedFrom</a></li><li><span class="title-icon "></span><a href="#beforerouteenter-&#x3001;-beforerouteupdate-&#x3001;-beforerouteleave"><b>1.1.29. </b>beforeRouteEnter &#x3001; beforeRouteUpdate &#x3001; beforeRouteLeave</a></li></ul><li><span class="title-icon "></span><a href="#&#x52A8;&#x6001;&#x8DEF;&#x7531;&#x5339;&#x914D;"><b>1.2. </b>&#x52A8;&#x6001;&#x8DEF;&#x7531;&#x5339;&#x914D;</a></li><li><span class="title-icon "></span><a href="#&#x5D4C;&#x5957;&#x8DEF;&#x7531;"><b>1.3. </b>&#x5D4C;&#x5957;&#x8DEF;&#x7531;</a></li><li><span class="title-icon "></span><a href="#&#x7F16;&#x7A0B;&#x5F0F;&#x7684;&#x5BFC;&#x822A;"><b>1.4. </b>&#x7F16;&#x7A0B;&#x5F0F;&#x7684;&#x5BFC;&#x822A;</a></li><li><span class="title-icon "></span><a href="#&#x547D;&#x540D;&#x8DEF;&#x7531;"><b>1.5. </b>&#x547D;&#x540D;&#x8DEF;&#x7531;</a></li><li><span class="title-icon "></span><a href="#&#x547D;&#x540D;&#x89C6;&#x56FE;"><b>1.6. </b>&#x547D;&#x540D;&#x89C6;&#x56FE;</a></li><li><span class="title-icon "></span><a href="#&#x522B;&#x540D;"><b>1.7. </b>&#x522B;&#x540D;</a></li><li><span class="title-icon "></span><a href="#&#x8DEF;&#x7531;&#x7EC4;&#x4EF6;&#x4F20;&#x53C2;"><b>1.8. </b>&#x8DEF;&#x7531;&#x7EC4;&#x4EF6;&#x4F20;&#x53C2;</a></li><ul><li><span class="title-icon "></span><a href="#props"><b>1.8.1. </b>props</a></li></ul><li><span class="title-icon "></span><a href="#html5-history-&#x6A21;&#x5F0F;"><b>1.9. </b>HTML5 History &#x6A21;&#x5F0F;</a></li><li><span class="title-icon "></span><a href="#&#x5BFC;&#x822A;&#x5B88;&#x536B;"><b>1.10. </b>&#x5BFC;&#x822A;&#x5B88;&#x536B;</a></li><li><span class="title-icon "></span><a href="#&#x8DEF;&#x7531;&#x5143;&#x4FE1;&#x606F;"><b>1.11. </b>&#x8DEF;&#x7531;&#x5143;&#x4FE1;&#x606F;</a></li><li><span class="title-icon "></span><a href="#&#x8FC7;&#x6E21;&#x52A8;&#x6548;"><b>1.12. </b>&#x8FC7;&#x6E21;&#x52A8;&#x6548;</a></li><li><span class="title-icon "></span><a href="#&#x6570;&#x636E;&#x83B7;&#x53D6;"><b>1.13. </b>&#x6570;&#x636E;&#x83B7;&#x53D6;</a></li><li><span class="title-icon "></span><a href="#&#x6EDA;&#x52A8;&#x884C;&#x4E3A;"><b>1.14. </b>&#x6EDA;&#x52A8;&#x884C;&#x4E3A;</a></li><li><span class="title-icon "></span><a href="#&#x8DEF;&#x7531;&#x61D2;&#x52A0;&#x8F7D;"><b>1.15. </b>&#x8DEF;&#x7531;&#x61D2;&#x52A0;&#x8F7D;</a></li><li><span class="title-icon "></span><a href="#&#x5176;&#x4ED6;&#x76F8;&#x5173;"><b>1.16. </b>&#x5176;&#x4ED6;&#x76F8;&#x5173;</a></li></ul></ul></div><a href="#vue-router" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="vue-router"><a name="vue-router" class="anchor-navigation-ex-anchor" href="#vue-router"><i class="fa fa-link" aria-hidden="true"></i></a>1. Vue Router</h1>
<p>&#x662F; Vue.js &#x5B98;&#x65B9;&#x7684;&#x8DEF;&#x7531;&#x7BA1;&#x7406;&#x5668;&#x3002;</p>
<p><br></p>
<h2 id="vue-router&#x914D;&#x7F6E;&#x9009;&#x9879;"><a name="vue-router&#x914D;&#x7F6E;&#x9009;&#x9879;" class="anchor-navigation-ex-anchor" href="#vue-router&#x914D;&#x7F6E;&#x9009;&#x9879;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1. vue-router&#x914D;&#x7F6E;&#x9009;&#x9879;</h2>
<h3 id="router-view"><a name="router-view" class="anchor-navigation-ex-anchor" href="#router-view"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.1. router-view</h3>
<p>&#x5C06;&#x8DEF;&#x7531;&#x5339;&#x914D;&#x5230;&#x7684;&#x7EC4;&#x4EF6;&#x6E32;&#x67D3;&#x5230;&#x8FD9;&#x91CC;&#x9762;</p>
<pre><code class="lang-xml">//name
&#x5982;&#x679C; <span class="hljs-tag">&lt;<span class="hljs-name">router-view</span>&gt;</span>&#x8BBE;&#x7F6E;&#x4E86;&#x540D;&#x79F0;&#xFF0C;&#x5219;&#x4F1A;&#x6E32;&#x67D3;&#x5BF9;&#x5E94;&#x7684;&#x8DEF;&#x7531;&#x914D;&#x7F6E;&#x4E2D; components &#x4E0B;&#x7684;&#x76F8;&#x5E94;&#x7EC4;&#x4EF6;&#x3002;&#x9ED8;&#x8BA4;&#x503C;: &quot;default&quot;
</code></pre>
<h3 id="router-link"><a name="router-link" class="anchor-navigation-ex-anchor" href="#router-link"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.2. router-link</h3>
<p>&#x6307;&#x5B9A;&#x5BFC;&#x822A;&#x5230;&#x54EA;&#x91CC; &#xFF0C;&#x9ED8;&#x8BA4;&#x6E32;&#x67D3;&#x6210;&#x6709;&#x94FE;&#x63A5;&#x7684; <a> &#x6807;&#x7B7E; &#x3002;</a></p>
<pre><code class="lang-xml">to  
&#x8DF3;&#x8F6C;&#x5230;&#x54EA;&#x91CC; , &#x4F1A;router.push()

replace  
&#x4F1A;&#x8C03;&#x7528; router.replace() &#xFF0C;&#x5BFC;&#x822A;&#x540E;&#x4E0D;&#x4F1A;&#x7559;&#x4E0B; history &#x8BB0;&#x5F55;&#x3002;

append
&#x5219;&#x5728;&#x5F53;&#x524D;&#x8DEF;&#x5F84;&#x524D;&#x6DFB;&#x52A0;&#x57FA;&#x8DEF;&#x5F84;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x4ECE; /a &#x5BFC;&#x822A;&#x5230;&#x4E00;&#x4E2A;&#x76F8;&#x5BF9;&#x8DEF;&#x5F84; b&#xFF0C;&#x5982;&#x679C;&#x6CA1;&#x6709;&#x914D;&#x7F6E;append&#xFF0C;&#x5219;&#x8DEF;&#x5F84;&#x4E3A; /b&#xFF0C;&#x5982;&#x679C;&#x914D;&#x4E86;&#xFF0C;&#x5219;&#x4E3A; /a/b &#x3002;

tag
&#x6E32;&#x67D3;&#x6210;&#x6307;&#x5B9A;&#x6807;&#x7B7E; &#xFF0C; &#x4F8B;&#x5982; li&#x6807;&#x7B7E; &#xFF0C;tag=&quot;li&quot;

active-class
&#x8BBE;&#x7F6E;&#x94FE;&#x63A5;&#x6FC0;&#x6D3B;&#x65F6;&#x4F7F;&#x7528;&#x7684; CSS &#x7C7B;&#x540D; , &#x9ED8;&#x8BA4;&#x503C;: &quot;router-link-active&quot;

exact
&#x662F;&#x5426;&#x6FC0;&#x6D3B; &#xFF0C;&#x8FD9;&#x4E2A;&#x94FE;&#x63A5;&#x53EA;&#x4F1A;&#x5728;&#x5730;&#x5740;&#x4E3A; / &#x7684;&#x65F6;&#x5019;&#x88AB;&#x6FC0;&#x6D3B; &#x3002;

event
&#x7528;&#x6765;&#x89E6;&#x53D1;&#x5BFC;&#x822A;&#x7684;&#x4E8B;&#x4EF6;

exact-active-class
&#x914D;&#x7F6E;&#x5F53;&#x94FE;&#x63A5;&#x88AB;&#x7CBE;&#x786E;&#x5339;&#x914D;&#x7684;&#x65F6;&#x5019;&#x5E94;&#x8BE5;&#x6FC0;&#x6D3B;&#x7684; class&#x3002;&#x9ED8;&#x8BA4;&#x503C;: &quot;router-link-exact-active&quot;
</code></pre>
<h3 id="routes"><a name="routes" class="anchor-navigation-ex-anchor" href="#routes"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.3. routes</h3>
<p>&#x6307;&#x5B9A;&#x4E00;&#x4E2A;&#x6570;&#x7EC4;&#x3002;&#x6570;&#x7EC4;&#x91CC;&#x9762;&#x662F;&#x5177;&#x4F53;&#x7684;&#x8DEF;&#x7531;&#x914D;&#x7F6E;&#x4FE1;&#x606F; &#x3002;</p>
<h3 id="app"><a name="app" class="anchor-navigation-ex-anchor" href="#app"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.4. app</h3>
<p>&#x914D;&#x7F6E; router &#x7684; Vue &#x6839;&#x5B9E;&#x4F8B;</p>
<h3 id="name"><a name="name" class="anchor-navigation-ex-anchor" href="#name"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.5. name</h3>
<p>&#x5F53;&#x524D;&#x8DEF;&#x7531;&#x7684;&#x540D;&#x79F0;</p>
<h3 id="path"><a name="path" class="anchor-navigation-ex-anchor" href="#path"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.6. path</h3>
<p>&#x5BF9;&#x5E94;&#x5F53;&#x524D;&#x8DEF;&#x7531;&#x7684;&#x8DEF;&#x5F84;</p>
<h3 id="redirect"><a name="redirect" class="anchor-navigation-ex-anchor" href="#redirect"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.7. redirect</h3>
<p>&#x91CD;&#x5B9A;&#x5411;&#x3002;
&#x201C;&#x91CD;&#x5B9A;&#x5411;&#x201D;&#x7684;&#x610F;&#x601D;&#x662F;&#xFF0C;&#x5F53;&#x7528;&#x6237;&#x8BBF;&#x95EE; /a&#x65F6;&#xFF0C;URL &#x5C06;&#x4F1A;&#x88AB;&#x66FF;&#x6362;&#x6210; /b&#xFF0C;&#x7136;&#x540E;&#x5339;&#x914D;&#x8DEF;&#x7531;&#x4E3A; /b</p>
<h3 id="router"><a name="router" class="anchor-navigation-ex-anchor" href="#router"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.8. router</h3>
<pre><code class="lang-xml">&#x901A;&#x8FC7;&#x5728; Vue &#x6839;&#x5B9E;&#x4F8B;&#x7684; router &#x914D;&#x7F6E;&#x4F20;&#x5165; router &#x5B9E;&#x4F8B;&#xFF0C;&#x4F1A;&#x88AB;&#x6CE8;&#x5165;&#x5230;&#x6BCF;&#x4E2A;&#x5B50;&#x7EC4;&#x4EF6;&#x3002;
this.$router  //router &#x5B9E;&#x4F8B;&#x3002;
this.$route //  &#x5F53;&#x524D;&#x6FC0;&#x6D3B;&#x7684;&#x8DEF;&#x7531;&#x4FE1;&#x606F;&#x5BF9;&#x8C61;&#x3002;&#x8FD9;&#x4E2A;&#x5C5E;&#x6027;&#x662F;&#x53EA;&#x8BFB;&#x7684; .
</code></pre>
<h3 id="mode"><a name="mode" class="anchor-navigation-ex-anchor" href="#mode"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.9. mode</h3>
<p>&#x8DEF;&#x7531;&#x6A21;&#x5F0F;</p>
<pre><code class="lang-xml">hash :  &#x6D4F;&#x89C8;&#x5668;&#x73AF;&#x5883;
abstract: Node.js &#x73AF;&#x5883;&#x3002;&#x5982;&#x679C;&#x53D1;&#x73B0;&#x6CA1;&#x6709;&#x6D4F;&#x89C8;&#x5668;&#x7684; API&#xFF0C;&#x8DEF;&#x7531;&#x4F1A;&#x81EA;&#x52A8;&#x5F3A;&#x5236;&#x8FDB;&#x5165;&#x8FD9;&#x4E2A;&#x6A21;&#x5F0F;&#x3002;
history: &#x4F9D;&#x8D56; HTML5 History API &#x548C;&#x670D;&#x52A1;&#x5668;&#x914D;&#x7F6E;&#x3002;
</code></pre>
<h3 id="base"><a name="base" class="anchor-navigation-ex-anchor" href="#base"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.10. base</h3>
<p>&#x5E94;&#x7528;&#x7684;&#x57FA;&#x8DEF;&#x5F84; , &#x9ED8;&#x8BA4;&#x503C;: &quot;/&quot;  &#x3002;&#x4F8B;&#x5982;&#xFF1A;&#x5982;&#x679C;&#x6574;&#x4E2A;&#x5355;&#x9875;&#x5E94;&#x7528;&#x670D;&#x52A1;&#x5728; /app/ &#x4E0B;&#xFF0C;&#x7136;&#x540E; base &#x5C31;&#x5E94;&#x8BE5;&#x8BBE;&#x4E3A; &quot;/app/&quot;&#x3002;</p>
<h3 id="linkactiveclass"><a name="linkactiveclass" class="anchor-navigation-ex-anchor" href="#linkactiveclass"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.11. linkActiveClass</h3>
<p>&#x5168;&#x5C40;&#x914D;&#x7F6E; <router-link> &#x7684;&#x9ED8;&#x8BA4;&#x201C;&#x6FC0;&#x6D3B; class &#x7C7B;&#x540D;&#x201D;&#x3002; &#x9ED8;&#x8BA4;&#x503C;: &quot;router-link-active&quot;</router-link></p>
<h3 id="linkexactactiveclass"><a name="linkexactactiveclass" class="anchor-navigation-ex-anchor" href="#linkexactactiveclass"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.12. linkExactActiveClass</h3>
<p>&#x5168;&#x5C40;&#x914D;&#x7F6E; <router-link> &#x7CBE;&#x786E;&#x6FC0;&#x6D3B;&#x7684;&#x9ED8;&#x8BA4;&#x7684; class&#x3002;&#x9ED8;&#x8BA4;&#x503C;: &quot;router-link-exact-active&quot;</router-link></p>
<h3 id="scrollbehavior"><a name="scrollbehavior" class="anchor-navigation-ex-anchor" href="#scrollbehavior"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.13. scrollBehavior</h3>
<p>&#x914D;&#x7F6E;&#x6EDA;&#x52A8;&#x884C;&#x4E3A;</p>
<h3 id="parsequery--stringifyquery"><a name="parsequery--stringifyquery" class="anchor-navigation-ex-anchor" href="#parsequery--stringifyquery"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.14. parseQuery / stringifyQuery</h3>
<p>&#x63D0;&#x4F9B;&#x81EA;&#x5B9A;&#x4E49;&#x67E5;&#x8BE2;&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x89E3;&#x6790;/&#x53CD;&#x89E3;&#x6790;&#x51FD;&#x6570;&#x3002;&#x8986;&#x76D6;&#x9ED8;&#x8BA4;&#x884C;&#x4E3A;</p>
<h3 id="fallback"><a name="fallback" class="anchor-navigation-ex-anchor" href="#fallback"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.15. fallback</h3>
<p>&#x5F53;&#x6D4F;&#x89C8;&#x5668;&#x4E0D;&#x652F;&#x6301; history.pushState &#x63A7;&#x5236;&#x8DEF;&#x7531;&#x662F;&#x5426;&#x5E94;&#x8BE5;&#x56DE;&#x9000;&#x5230; hash &#x6A21;&#x5F0F;&#x3002;
&#x9ED8;&#x8BA4;&#x503C;&#x4E3A; true&#x3002;</p>
<h3 id="currentroute"><a name="currentroute" class="anchor-navigation-ex-anchor" href="#currentroute"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.16. currentRoute</h3>
<p>&#x5F53;&#x524D;&#x8DEF;&#x7531;&#x5BF9;&#x5E94;&#x7684;&#x8DEF;&#x7531;&#x4FE1;&#x606F;&#x5BF9;&#x8C61;</p>
<h3 id="push-&#x3001;--replace-&#x3001;go-&#x3001;-back-&#x3001;-forward"><a name="push-&#x3001;--replace-&#x3001;go-&#x3001;-back-&#x3001;-forward" class="anchor-navigation-ex-anchor" href="#push-&#x3001;--replace-&#x3001;go-&#x3001;-back-&#x3001;-forward"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.17. push &#x3001;  replace &#x3001;go &#x3001; back &#x3001; forward</h3>
<p>&#x52A8;&#x6001;&#x7684;&#x5BFC;&#x822A;&#x5230;&#x4E00;&#x4E2A;&#x65B0; URL</p>
<pre><code class="lang-xml">push
&#x5BFC;&#x822A;&#x5230;.. &#xFF0C;&#x4F1A;&#x7559;&#x4E0B;&#x5386;&#x53F2;&#x8BB0;&#x5F55;

replace
&#x5BFC;&#x822A;&#x5230; &#xFF0C;&#x4E0D;&#x4F1A;&#x7559;&#x4E0B;&#x8BB0;&#x5F55;

go
&#x5728; history &#x8BB0;&#x5F55;&#x4E2D;&#x5411;&#x524D;&#x6216;&#x8005;&#x540E;&#x9000;&#x591A;&#x5C11;&#x6B65;
</code></pre>
<h3 id="getmatchedcomponents"><a name="getmatchedcomponents" class="anchor-navigation-ex-anchor" href="#getmatchedcomponents"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.18. getMatchedComponents</h3>
<p>&#x8FD4;&#x56DE; &#x76EE;&#x6807;&#x4F4D;&#x7F6E;&#x6216; &#x5F53;&#x524D;&#x8DEF;&#x7531;&#x5339;&#x914D;&#x7684;&#x7EC4;&#x4EF6;&#x6570;&#x7EC4;  </p>
<h3 id="resolve"><a name="resolve" class="anchor-navigation-ex-anchor" href="#resolve"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.19. resolve</h3>
<p>&#x89E3;&#x6790;&#x76EE;&#x6807;&#x4F4D;&#x7F6E;</p>
<pre><code class="lang-xml">current &#x662F;&#x5F53;&#x524D;&#x9ED8;&#x8BA4;&#x7684;&#x8DEF;&#x7531;
append &#x5141;&#x8BB8;&#x4F60;&#x5728; current &#x8DEF;&#x7531;&#x4E0A;&#x9644;&#x52A0;&#x8DEF;&#x5F84;
</code></pre>
<h3 id="addroutes"><a name="addroutes" class="anchor-navigation-ex-anchor" href="#addroutes"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.20. addRoutes</h3>
<p>&#x52A8;&#x6001;&#x6DFB;&#x52A0;&#x66F4;&#x591A;&#x7684;&#x8DEF;&#x7531;&#x89C4;&#x5219;&#x3002;&#x53C2;&#x6570;&#x5FC5;&#x987B;&#x662F;&#x4E00;&#x4E2A;&#x7B26;&#x5408; routes &#x9009;&#x9879;&#x8981;&#x6C42;&#x7684;&#x6570;&#x7EC4;&#x3002;</p>
<h3 id="onready"><a name="onready" class="anchor-navigation-ex-anchor" href="#onready"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.21. onReady</h3>
<p>&#x5728;&#x8DEF;&#x7531;&#x5B8C;&#x6210;&#x521D;&#x59CB;&#x5BFC;&#x822A;&#x65F6;&#x8C03;&#x7528;</p>
<h3 id="onerror"><a name="onerror" class="anchor-navigation-ex-anchor" href="#onerror"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.22. onError</h3>
<p>&#x5728;&#x8DEF;&#x7531;&#x5BFC;&#x822A;&#x8FC7;&#x7A0B;&#x4E2D;&#x51FA;&#x9519;&#x65F6;&#x88AB;&#x8C03;&#x7528;</p>
<h3 id="params"><a name="params" class="anchor-navigation-ex-anchor" href="#params"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.23. params</h3>
<p>&#x4E00;&#x4E2A; key/value &#x5BF9;&#x8C61;&#xFF0C;&#x5305;&#x542B;&#x4E86;&#x52A8;&#x6001;&#x7247;&#x6BB5;&#x548C;&#x5168;&#x5339;&#x914D;&#x7247;&#x6BB5;&#xFF0C;&#x5982;&#x679C;&#x6CA1;&#x6709;&#x8DEF;&#x7531;&#x53C2;&#x6570;&#xFF0C;&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x7A7A;&#x5BF9;&#x8C61;&#x3002;</p>
<h3 id="query"><a name="query" class="anchor-navigation-ex-anchor" href="#query"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.24. query</h3>
<p>&#x4E00;&#x4E2A; key/value &#x5BF9;&#x8C61;&#xFF0C;&#x8868;&#x793A; URL &#x67E5;&#x8BE2;&#x53C2;&#x6570;&#x3002;</p>
<pre><code class="lang-xml">&#x4F8B;&#x5982;&#xFF0C;&#x5BF9;&#x4E8E;&#x8DEF;&#x5F84; /foo?user=1&#xFF0C;&#x5219;&#x6709; $route.query.user == 1&#xFF0C;
&#x5982;&#x679C;&#x6CA1;&#x6709;&#x67E5;&#x8BE2;&#x53C2;&#x6570;&#xFF0C;&#x5219;&#x662F;&#x4E2A;&#x7A7A;&#x5BF9;&#x8C61;&#x3002;
</code></pre>
<h3 id="hash"><a name="hash" class="anchor-navigation-ex-anchor" href="#hash"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.25. hash</h3>
<p>&#x5F53;&#x524D;&#x8DEF;&#x7531;&#x7684; hash &#x503C; (&#x5E26; #) &#xFF0C;&#x5982;&#x679C;&#x6CA1;&#x6709; hash &#x503C;&#xFF0C;&#x5219;&#x4E3A;&#x7A7A;&#x5B57;&#x7B26;&#x4E32;&#x3002;</p>
<h3 id="fullpath"><a name="fullpath" class="anchor-navigation-ex-anchor" href="#fullpath"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.26. fullPath</h3>
<p>&#x5B8C;&#x6210;&#x89E3;&#x6790;&#x540E;&#x7684; URL&#xFF0C;&#x5305;&#x542B;&#x67E5;&#x8BE2;&#x53C2;&#x6570;&#x548C; hash &#x7684;&#x5B8C;&#x6574;&#x8DEF;&#x5F84;&#x3002;</p>
<h3 id="matched"><a name="matched" class="anchor-navigation-ex-anchor" href="#matched"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.27. matched</h3>
<p>&#x4E00;&#x4E2A;&#x6570;&#x7EC4; &#x3002;&#x5305;&#x542B;&#x5F53;&#x524D;&#x8DEF;&#x7531;&#x7684;&#x6240;&#x6709;&#x5D4C;&#x5957;&#x8DEF;&#x5F84;&#x7247;&#x6BB5;&#x7684;&#x8DEF;&#x7531;&#x8BB0;&#x5F55; &#x3002;&#x8DEF;&#x7531;&#x8BB0;&#x5F55;&#x5C31;&#x662F; routes &#x914D;&#x7F6E;&#x6570;&#x7EC4;&#x4E2D;&#x7684;&#x5BF9;&#x8C61;&#x526F;&#x672C;</p>
<h3 id="redirectedfrom"><a name="redirectedfrom" class="anchor-navigation-ex-anchor" href="#redirectedfrom"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.28. redirectedFrom</h3>
<p>&#x5982;&#x679C;&#x5B58;&#x5728;&#x91CD;&#x5B9A;&#x5411;&#xFF0C;&#x5373;&#x4E3A;&#x91CD;&#x5B9A;&#x5411;&#x6765;&#x6E90;&#x7684;&#x8DEF;&#x7531;&#x7684;&#x540D;&#x5B57;&#x3002;</p>
<h3 id="beforerouteenter-&#x3001;-beforerouteupdate-&#x3001;-beforerouteleave"><a name="beforerouteenter-&#x3001;-beforerouteupdate-&#x3001;-beforerouteleave" class="anchor-navigation-ex-anchor" href="#beforerouteenter-&#x3001;-beforerouteupdate-&#x3001;-beforerouteleave"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.29. beforeRouteEnter &#x3001; beforeRouteUpdate &#x3001; beforeRouteLeave</h3>
<p>&#x7EC4;&#x4EF6;&#x5185;&#x7684;&#x5B88;&#x536B;&#x51FD;&#x6570; &#x3002;</p>
<p><br></p>
<h2 id="&#x52A8;&#x6001;&#x8DEF;&#x7531;&#x5339;&#x914D;"><a name="&#x52A8;&#x6001;&#x8DEF;&#x7531;&#x5339;&#x914D;" class="anchor-navigation-ex-anchor" href="#&#x52A8;&#x6001;&#x8DEF;&#x7531;&#x5339;&#x914D;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2. &#x52A8;&#x6001;&#x8DEF;&#x7531;&#x5339;&#x914D;</h2>
<p>&#x4F8B;&#x5982;&#xFF0C;&#x6211;&#x4EEC;&#x6709;&#x4E00;&#x4E2A; User &#x7EC4;&#x4EF6;&#xFF0C;&#x5BF9;&#x4E8E;&#x6240;&#x6709; ID &#x5404;&#x4E0D;&#x76F8;&#x540C;&#x7684;&#x7528;&#x6237;&#xFF0C;&#x90FD;&#x8981;&#x4F7F;&#x7528;&#x8FD9;&#x4E2A;&#x7EC4;&#x4EF6;&#x6765;&#x6E32;&#x67D3;&#x3002;
&#x52A8;&#x6001;&#x8DEF;&#x5F84;&#x53C2;&#x6570; &#x4EE5;&#x5192;&#x53F7;&#x5F00;&#x5934; .</p>
<pre><code class="lang-xml">path: &apos;/user/:id&apos;   --&gt; /user/1001
</code></pre>
<h2 id="&#x5D4C;&#x5957;&#x8DEF;&#x7531;"><a name="&#x5D4C;&#x5957;&#x8DEF;&#x7531;" class="anchor-navigation-ex-anchor" href="#&#x5D4C;&#x5957;&#x8DEF;&#x7531;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3. &#x5D4C;&#x5957;&#x8DEF;&#x7531;</h2>
<p>&#x5728;&#x7EC4;&#x4EF6;&#x4E2D;&#x5D4C;&#x5957;&#x914D;&#x7F6E; <router-view> &#x3002;
&#x4EE5; / &#x5F00;&#x5934;&#x7684;&#x5D4C;&#x5957;&#x8DEF;&#x5F84;&#x4F1A;&#x88AB;&#x5F53;&#x4F5C;&#x6839;&#x8DEF;&#x5F84;</router-view></p>
<h2 id="&#x7F16;&#x7A0B;&#x5F0F;&#x7684;&#x5BFC;&#x822A;"><a name="&#x7F16;&#x7A0B;&#x5F0F;&#x7684;&#x5BFC;&#x822A;" class="anchor-navigation-ex-anchor" href="#&#x7F16;&#x7A0B;&#x5F0F;&#x7684;&#x5BFC;&#x822A;"><i class="fa fa-link" aria-hidden="true"></i></a>1.4. &#x7F16;&#x7A0B;&#x5F0F;&#x7684;&#x5BFC;&#x822A;</h2>
<pre><code class="lang-xml">//&#x58F0;&#x660E;&#x5F0F;
<span class="hljs-tag">&lt;<span class="hljs-name">router-link</span> <span class="hljs-attr">:to</span>=<span class="hljs-string">&quot;...&quot;</span>&gt;</span>
//&#x7F16;&#x7A0B;&#x5F0F;
router.push(...)
</code></pre>
<h2 id="&#x547D;&#x540D;&#x8DEF;&#x7531;"><a name="&#x547D;&#x540D;&#x8DEF;&#x7531;" class="anchor-navigation-ex-anchor" href="#&#x547D;&#x540D;&#x8DEF;&#x7531;"><i class="fa fa-link" aria-hidden="true"></i></a>1.5. &#x547D;&#x540D;&#x8DEF;&#x7531;</h2>
<pre><code class="lang-xml">&#x5B9A;&#x4E49;&#x8DEF;&#x7531;  name: &apos;user&apos;...

&#x914D;&#x5408;
<span class="hljs-tag">&lt;<span class="hljs-name">router-link</span> <span class="hljs-attr">:to</span>=<span class="hljs-string">&quot;{ name: &apos;user&apos;, params: { userId: 123 }}&quot;</span>&gt;</span>User<span class="hljs-tag">&lt;/<span class="hljs-name">router-link</span>&gt;</span>
</code></pre>
<h2 id="&#x547D;&#x540D;&#x89C6;&#x56FE;"><a name="&#x547D;&#x540D;&#x89C6;&#x56FE;" class="anchor-navigation-ex-anchor" href="#&#x547D;&#x540D;&#x89C6;&#x56FE;"><i class="fa fa-link" aria-hidden="true"></i></a>1.6. &#x547D;&#x540D;&#x89C6;&#x56FE;</h2>
<pre><code class="lang-xml">router-view &#x540D;&#x5B57;&#x9ED8;&#x8BA4;&#x4E3A; default&#x3002;

// &#x5B9A;&#x4E49;
<span class="hljs-tag">&lt;<span class="hljs-name">router-view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;view one&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">router-view</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">router-view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;view two&quot;</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;a&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">router-view</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">router-view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;view three&quot;</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;b&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">router-view</span>&gt;</span>

// &#x7ED1;&#x5B9A;
routes: [
   {
     path: &apos;/&apos;,
     components: {
       default: Foo,
       a: Bar,
       b: Baz
     }
   }
 ]
</code></pre>
<h2 id="&#x522B;&#x540D;"><a name="&#x522B;&#x540D;" class="anchor-navigation-ex-anchor" href="#&#x522B;&#x540D;"><i class="fa fa-link" aria-hidden="true"></i></a>1.7. &#x522B;&#x540D;</h2>
<pre><code class="lang-xml">/a &#x7684;&#x522B;&#x540D;&#x662F; /b&#xFF0C;&#x610F;&#x5473;&#x7740;&#xFF0C;&#x5F53;&#x7528;&#x6237;&#x8BBF;&#x95EE; /b &#x65F6;&#xFF0C;URL &#x4F1A;&#x4FDD;&#x6301;&#x4E3A; /b&#xFF0C;&#x4F46;&#x662F;&#x8DEF;&#x7531;&#x5339;&#x914D;&#x5219;&#x4E3A; /a&#xFF0C;&#x5C31;&#x50CF;&#x7528;&#x6237;&#x8BBF;&#x95EE; /a &#x4E00;&#x6837;&#x3002;

&#x201C;&#x522B;&#x540D;&#x201D;&#x7684;&#x529F;&#x80FD;&#x8BA9;&#x4F60;&#x53EF;&#x4EE5;&#x81EA;&#x7531;&#x5730;&#x5C06; UI &#x7ED3;&#x6784;&#x6620;&#x5C04;&#x5230;&#x4EFB;&#x610F;&#x7684; URL&#xFF0C;&#x800C;&#x4E0D;&#x662F;&#x53D7;&#x9650;&#x4E8E;&#x914D;&#x7F6E;&#x7684;&#x5D4C;&#x5957;&#x8DEF;&#x7531;&#x7ED3;&#x6784;&#x3002;
{ path: &apos;/a&apos;, component: A, alias: &apos;/b&apos; }
</code></pre>
<h2 id="&#x8DEF;&#x7531;&#x7EC4;&#x4EF6;&#x4F20;&#x53C2;"><a name="&#x8DEF;&#x7531;&#x7EC4;&#x4EF6;&#x4F20;&#x53C2;" class="anchor-navigation-ex-anchor" href="#&#x8DEF;&#x7531;&#x7EC4;&#x4EF6;&#x4F20;&#x53C2;"><i class="fa fa-link" aria-hidden="true"></i></a>1.8. &#x8DEF;&#x7531;&#x7EC4;&#x4EF6;&#x4F20;&#x53C2;</h2>
<pre><code class="lang-xml">??
props    // &#x7528;&#x6765;&#x4F20;&#x53C2;
&#x5E03;&#x5C14;&#x6A21;&#x5F0F;
&#x5BF9;&#x8C61;&#x6A21;&#x5F0F;
&#x51FD;&#x6570;&#x6A21;&#x5F0F;
</code></pre>
<h3 id="props"><a name="props" class="anchor-navigation-ex-anchor" href="#props"><i class="fa fa-link" aria-hidden="true"></i></a>1.8.1. props</h3>
<p>&#x7EC4;&#x4EF6;&#x548C;&#x7EC4;&#x4EF6;&#x4E4B;&#x95F4;&#x662F;&#x76F8;&#x4E92;&#x72EC;&#x7ACB;&#x7684;&#xFF0C;&#x5373;&#x4F7F;&#x6709;&#x540C;&#x540D;&#x5C5E;&#x6027;&#xFF0C;&#x503C;&#x4E5F;&#x4E0D;&#x5171;&#x4EAB;&#x3002;</p>
<h4 id="props-&#x53C2;&#x6570;&#x547D;&#x540D;"><a name="props-&#x53C2;&#x6570;&#x547D;&#x540D;" class="anchor-navigation-ex-anchor" href="#props-&#x53C2;&#x6570;&#x547D;&#x540D;"><i class="fa fa-link" aria-hidden="true"></i></a>props &#x53C2;&#x6570;&#x547D;&#x540D;</h4>
<p>html&#x6807;&#x7B7E;&#x4E2D;&#x8981;&#x4F20;&#x9012;&#x7684;&#x503C;&#x8981;&#x5199;&#x6210;&#x77ED;&#x6A2A;&#x7EBF;&#x5F0F;&#x7684; &#xFF0C;
&#x800C;&#x5728;props&#x7684;&#x6570;&#x7EC4;&#x4E2D;&#xFF0C;&#x548C;&#x63D2;&#x503C;&#x4FDD;&#x6301;&#x4E00;&#x81F4;&#xFF0C;&#x5199;&#x6210;&#x9A7C;&#x5CF0;&#x5F0F;&#x7684; &#x3002;</p>
<pre><code class="lang-xml">// &#x77ED;&#x6A2A;&#x7EBF;&#x7684;&#x4F4D;&#x7F6E;&#x968F;&#x610F;
Vue.component(&apos;blog-post&apos;, {
  props: [&apos;postTitle&apos;],
  template: &apos;<span class="hljs-tag">&lt;<span class="hljs-name">h3</span>&gt;</span>{{ postTitle }}<span class="hljs-tag">&lt;/<span class="hljs-name">h3</span>&gt;</span>&apos;
})
</code></pre>
<h4 id="props-&#x7C7B;&#x578B;"><a name="props-&#x7C7B;&#x578B;" class="anchor-navigation-ex-anchor" href="#props-&#x7C7B;&#x578B;"><i class="fa fa-link" aria-hidden="true"></i></a>props &#x7C7B;&#x578B;</h4>
<pre><code class="lang-xml">props: {
  title: String,
  likes: Number,
  isPublished: Boolean,
  commentIds: Array,
  author: Object
}
</code></pre>
<h4 id="&#x7236;&#x7EC4;&#x4EF6;&#x3001;&#x5B50;&#x7EC4;&#x4EF6;&#x5355;&#x5411;&#x7ED1;&#x5B9A;"><a name="&#x7236;&#x7EC4;&#x4EF6;&#x3001;&#x5B50;&#x7EC4;&#x4EF6;&#x5355;&#x5411;&#x7ED1;&#x5B9A;" class="anchor-navigation-ex-anchor" href="#&#x7236;&#x7EC4;&#x4EF6;&#x3001;&#x5B50;&#x7EC4;&#x4EF6;&#x5355;&#x5411;&#x7ED1;&#x5B9A;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7236;&#x7EC4;&#x4EF6;&#x3001;&#x5B50;&#x7EC4;&#x4EF6;&#x5355;&#x5411;&#x7ED1;&#x5B9A;</h4>
<p>&#x7236;&#x7EA7; prop &#x7684;&#x66F4;&#x65B0;&#x4F1A;&#x5411;&#x4E0B;&#x6D41;&#x52A8;&#x5230;&#x5B50;&#x7EC4;&#x4EF6;&#x4E2D;&#xFF0C;&#x4F46;&#x662F;&#x53CD;&#x8FC7;&#x6765;&#x5219;&#x4E0D;&#x884C;&#x3002;</p>
<pre><code class="lang-xml">```

####  &#x7236;&#x7EC4;&#x4EF6;&#x3001;&#x5B50;&#x7EC4;&#x4EF6;&#x53CC;&#x5411;&#x7ED1;&#x5B9A;
####  props &#x53C2;&#x6570;&#x6821;&#x9A8C;
```xml
// type &#x8868;&#x793A;&#x7C7B;&#x578B;
String&#x3001;Number&#x3001;Boolean&#x3001;Array&#x3001;Object&#x3001;Date&#x3001;Function &#x3001;Symbol
// required &#x8868;&#x793A;&#x5FC5;&#x586B;
// default &#x8868;&#x793A;&#x9ED8;&#x8BA4;&#x503C; &#x3002;&#x9ED8;&#x8BA4;&#x503C;&#x53EF;&#x4EE5;&#x662F;&#x503C;&#x3001;&#x6570;&#x7EC4;&#x3001;&#x5BF9;&#x8C61;&#x3001;&#x51FD;&#x6570;
// validator &#x8868;&#x793A;&#x6821;&#x9A8C;&#x5668;

Vue.component(&apos;my-component&apos;, {
  props: {
    // &#x5355;&#x4E2A;&#x7C7B;&#x578B;&#x68C0;&#x67E5; (`null` &#x5339;&#x914D;&#x4EFB;&#x4F55;&#x7C7B;&#x578B;)
    propA: Number,
    // &#x6570;&#x7EC4;&#x8868;&#x793A;&#x53EF;&#x4EE5;&#x6709;&#x591A;&#x4E2A;&#x53EF;&#x80FD;&#x7684;&#x7C7B;&#x578B;
    propB: [String, Number],
    propC: {
      type: String,
      required : true
    },
    propD: {
      type: Number,
      default: 100
    },
    propE: {
      type: Object,
      default: function () {
        return { message: &apos;hello&apos; }
      }
    },
    propF: {
      validator: function (value) {
        return [&apos;success&apos;, &apos;warning&apos;, &apos;danger&apos;].indexOf(value) !== -1
      }
    }
  }
})
</code></pre>
<h4 id="&#x975E;prop&#x7279;&#x6027;"><a name="&#x975E;prop&#x7279;&#x6027;" class="anchor-navigation-ex-anchor" href="#&#x975E;prop&#x7279;&#x6027;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x975E;Prop&#x7279;&#x6027;</h4>
<p>&#x5C31;&#x662F;&#x5176;&#x4ED6;&#x4EBA;&#x505A;&#x4E86;&#x4E00;&#x4E2A;&#x5B50;&#x63A7;&#x4EF6;&#x7ED9;&#x6211;&#x4EEC;&#x7528;&#xFF0C; &#x7528;&#x7684;&#x65F6;&#x5019;&#x6211;&#x53D1;&#x73B0;&#x9700;&#x8981;&#x5728;&#x5B50;&#x63A7;&#x4EF6;&#x4E2D;&#x589E;&#x52A0;&#x4E00;&#x4E2A;&#x65B0;&#x7279;&#x6027;&#x624D;&#x80FD;&#x6EE1;&#x8DB3;&#x6211;&#x4EEC;&#x7684;&#x8981;&#x6C42;&#x3002;(&#x8FD9;&#x4E2A;&#x7279;&#x6027;&#x4F5C;&#x8005;&#x6CA1;&#x6709;&#x5728;props&#x4E2D;&#x5B9A;&#x4E49;&#x8FC7;)
&#x8FD9;&#x4E2A;&#x6211;&#x4EEC;&#x65B0;&#x589E;&#x7684;&#x7279;&#x6027;&#x5C31;&#x662F;&#x975E;prop&#x7279;&#x6027;&#x3002;</p>
<pre><code class="lang-xml">&#x7236;&#x63A7;&#x4EF6;&#x4E2D;&#x4F20;&#x5165;
<span class="hljs-tag">&lt;<span class="hljs-name">Someinput</span> <span class="hljs-attr">data-3d-date-picker</span>=<span class="hljs-string">&quot;activated&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">Someinput</span>&gt;</span>
// &#x5B50;&#x63A7;&#x4EF6;&#x4E2D;&#x83B7;&#x53D6;
console.log(this.$el.getAttribute(&apos;data-3d-date-picker&apos;);
</code></pre>
<h4 id="prop-&#x7684;-&#x66FF;&#x6362;&#x548C;&#x7EC4;&#x5408;"><a name="prop-&#x7684;-&#x66FF;&#x6362;&#x548C;&#x7EC4;&#x5408;" class="anchor-navigation-ex-anchor" href="#prop-&#x7684;-&#x66FF;&#x6362;&#x548C;&#x7EC4;&#x5408;"><i class="fa fa-link" aria-hidden="true"></i></a>prop &#x7684; &#x66FF;&#x6362;&#x548C;&#x7EC4;&#x5408;</h4>
<p>&#x5BF9;&#x4E8E;&#x7EDD;&#x5927;&#x591A;&#x6570;&#x7279;&#x6027;&#x6765;&#x8BF4;&#xFF0C;&#x4ECE;&#x5916;&#x90E8;&#x63D0;&#x4F9B;&#x7ED9;&#x7EC4;&#x4EF6;&#x7684;&#x503C;&#x4F1A;&#x66FF;&#x6362;&#x6389;&#x7EC4;&#x4EF6;&#x5185;&#x90E8;&#x8BBE;&#x7F6E;&#x597D;&#x7684;&#x503C;&#x3002;
class &#x548C; style &#x7279;&#x6027;&#x4F1A;&#x5C06;&#x4E24;&#x4E2A;&#x503C;&#x5408;&#x5E76;&#x8D77;&#x6765;</p>
<h4 id="prop-&#x7981;&#x6B62;&#x7EE7;&#x627F;"><a name="prop-&#x7981;&#x6B62;&#x7EE7;&#x627F;" class="anchor-navigation-ex-anchor" href="#prop-&#x7981;&#x6B62;&#x7EE7;&#x627F;"><i class="fa fa-link" aria-hidden="true"></i></a>prop &#x7981;&#x6B62;&#x7EE7;&#x627F;</h4>
<p>inheritAttrs: false</p>
<h2 id="html5-history-&#x6A21;&#x5F0F;"><a name="html5-history-&#x6A21;&#x5F0F;" class="anchor-navigation-ex-anchor" href="#html5-history-&#x6A21;&#x5F0F;"><i class="fa fa-link" aria-hidden="true"></i></a>1.9. HTML5 History &#x6A21;&#x5F0F;</h2>
<p>&#x5F53;&#x4F60;&#x4F7F;&#x7528; history &#x6A21;&#x5F0F;&#x65F6;&#xFF0C;URL &#x683C;&#x5F0F;&#x7C7B;&#x4F3C;  <a href="http://yoursite.com/user/id" target="_blank">http://yoursite.com/user/id</a>  &#x3002;
&#x8FD9;&#x79CD;&#x6A21;&#x5F0F;&#x9700;&#x8981;&#x540E;&#x53F0;&#x914D;&#x7F6E;&#x652F;&#x6301;&#x3002;</p>
<h2 id="&#x5BFC;&#x822A;&#x5B88;&#x536B;"><a name="&#x5BFC;&#x822A;&#x5B88;&#x536B;" class="anchor-navigation-ex-anchor" href="#&#x5BFC;&#x822A;&#x5B88;&#x536B;"><i class="fa fa-link" aria-hidden="true"></i></a>1.10. &#x5BFC;&#x822A;&#x5B88;&#x536B;</h2>
<p>&#x8FD9;&#x540D;&#x5B57;&#x8D77;&#x5F97;&#x4E0D;&#x597D;&#x7406;&#x89E3;&#x3002;&#x5176;&#x5B9E;&#x5C31;&#x662F; &#x8DEF;&#x7531;&#x8DF3;&#x8F6C;&#x524D;&#x505A;&#x4E00;&#x4E9B;&#x9A8C;&#x8BC1;&#xFF0C;&#x6BD4;&#x5982;&#x767B;&#x5F55;&#x9A8C;&#x8BC1;&#x7B49; &#x3002;</p>
<pre><code class="lang-xml">&#x5B9A;&#x4E49;&#x5168;&#x5C40;&#x7684;&#x5BFC;&#x822A;&#x5B88;&#x536B;&#x884C;&#x4E3A;&#x3002;
beforeEach
&#x8DF3;&#x8F6C;&#x4E4B;&#x524D; &#x505A;&#x4E00;&#x4E9B;&#x903B;&#x8F91;&#x5904;&#x7406;

beforeResolve
&#x89E3;&#x6790;&#x4E4B;&#x524D;&#x53EF;&#x4EE5;&#x505A;&#x7684;&#x4E00;&#x4E9B;&#x5B88;&#x536B;&#x903B;&#x8F91;

afterEach
&#x8DF3;&#x8F6C;&#x4E4B;&#x540E; &#x505A;&#x4E00;&#x4E9B;&#x903B;&#x8F91;&#x5904;&#x7406;


to  
&#x5373;&#x5C06;&#x8981;&#x8FDB;&#x5165;&#x7684;&#x76EE;&#x6807;&#x8DEF;&#x7531;&#x5BF9;&#x8C61;

from
&#x5F53;&#x524D;&#x5BFC;&#x822A;&#x6B63;&#x8981;&#x79BB;&#x5F00;&#x7684;&#x8DEF;&#x7531;

next  
next()         &#x8FDB;&#x884C;&#x7BA1;&#x9053;&#x4E2D;&#x7684;&#x4E0B;&#x4E00;&#x4E2A;&#x94A9;&#x5B50;
next(false)    &#x4E2D;&#x65AD;&#x5F53;&#x524D;&#x7684;&#x5BFC;&#x822A;&#x3002;&#x5982;&#x679C;&#x662F;&#x6D4F;&#x89C8;&#x5668;&#x7684;url&#x6539;&#x53D8;&#x4E86;&#xFF0C;&#x90A3;&#x4E48;url&#x5730;&#x5740;&#x4F1A;&#x91CD;&#x7F6E;from&#x8DEF;&#x7531;&#x5BF9;&#x5E94;&#x7684;&#x5730;&#x5740;
next(&#x2018;/&#x2019;)&#x6216; next({path: &#x2018;/&#x2019;})     &#x8DF3;&#x8F6C;&#x5230;&#x4E00;&#x4E2A;&#x4E0D;&#x540C;&#x7684;&#x5730;&#x5740;&#xFF0C;&#x539F;&#x6765;&#x7684;&#x8DF3;&#x8F6C;&#x4E2D;&#x65AD;
next(error):(2.4+)     &#x53C2;&#x6570;&#x662F;&#x4E00;&#x4E2A;eoor&#x5B9E;&#x4F8B;&#xFF0C;&#x5BFC;&#x822A;&#x7EC8;&#x6B62;&#xFF0C;&#x9519;&#x8BEF;&#x4F20;&#x9012;&#x7ED9;router.onError()&#x7684;&#x56DE;&#x8C03;
</code></pre>
<h2 id="&#x8DEF;&#x7531;&#x5143;&#x4FE1;&#x606F;"><a name="&#x8DEF;&#x7531;&#x5143;&#x4FE1;&#x606F;" class="anchor-navigation-ex-anchor" href="#&#x8DEF;&#x7531;&#x5143;&#x4FE1;&#x606F;"><i class="fa fa-link" aria-hidden="true"></i></a>1.11. &#x8DEF;&#x7531;&#x5143;&#x4FE1;&#x606F;</h2>
<p>meta &#x9644;&#x52A0;&#x5C5E;&#x6027;&#x914D;&#x7F6E;</p>
<h2 id="&#x8FC7;&#x6E21;&#x52A8;&#x6548;"><a name="&#x8FC7;&#x6E21;&#x52A8;&#x6548;" class="anchor-navigation-ex-anchor" href="#&#x8FC7;&#x6E21;&#x52A8;&#x6548;"><i class="fa fa-link" aria-hidden="true"></i></a>1.12. &#x8FC7;&#x6E21;&#x52A8;&#x6548;</h2>
<p><router-view> &#x662F;&#x57FA;&#x672C;&#x7684;&#x52A8;&#x6001;&#x7EC4;&#x4EF6;&#xFF0C; &#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x7528; <transition> &#x7EC4;&#x4EF6;&#x7ED9;&#x5B83;&#x6DFB;&#x52A0;&#x4E00;&#x4E9B;&#x8FC7;&#x6E21;&#x6548;&#x679C;</transition></router-view></p>
<h2 id="&#x6570;&#x636E;&#x83B7;&#x53D6;"><a name="&#x6570;&#x636E;&#x83B7;&#x53D6;" class="anchor-navigation-ex-anchor" href="#&#x6570;&#x636E;&#x83B7;&#x53D6;"><i class="fa fa-link" aria-hidden="true"></i></a>1.13. &#x6570;&#x636E;&#x83B7;&#x53D6;</h2>
<pre><code class="lang-xml">&#x5BFC;&#x822A;&#x5B8C;&#x6210;&#x4E4B;&#x540E;&#x83B7;&#x53D6;&#xFF1A;
&#x5148;&#x5B8C;&#x6210;&#x5BFC;&#x822A;&#xFF0C;&#x7136;&#x540E;&#x5728;&#x63A5;&#x4E0B;&#x6765;&#x7684;&#x7EC4;&#x4EF6;&#x751F;&#x547D;&#x5468;&#x671F;&#x94A9;&#x5B50;&#x4E2D;&#x83B7;&#x53D6;&#x6570;&#x636E;&#x3002;&#x5728;&#x6570;&#x636E;&#x83B7;&#x53D6;&#x671F;&#x95F4;&#x663E;&#x793A;&#x201C;&#x52A0;&#x8F7D;&#x4E2D;&#x201D;&#x4E4B;&#x7C7B;&#x7684;&#x6307;&#x793A;&#x3002;

&#x5BFC;&#x822A;&#x5B8C;&#x6210;&#x4E4B;&#x524D;&#x83B7;&#x53D6;&#xFF1A;
&#x5BFC;&#x822A;&#x5B8C;&#x6210;&#x524D;&#xFF0C;&#x5728;&#x8DEF;&#x7531;&#x8FDB;&#x5165;&#x7684;&#x5B88;&#x536B;&#x4E2D;&#x83B7;&#x53D6;&#x6570;&#x636E;&#xFF0C;&#x5728;&#x6570;&#x636E;&#x83B7;&#x53D6;&#x6210;&#x529F;&#x540E;&#x6267;&#x884C;&#x5BFC;&#x822A;&#x3002;
</code></pre>
<h2 id="&#x6EDA;&#x52A8;&#x884C;&#x4E3A;"><a name="&#x6EDA;&#x52A8;&#x884C;&#x4E3A;" class="anchor-navigation-ex-anchor" href="#&#x6EDA;&#x52A8;&#x884C;&#x4E3A;"><i class="fa fa-link" aria-hidden="true"></i></a>1.14. &#x6EDA;&#x52A8;&#x884C;&#x4E3A;</h2>
<p>&#x5F53;&#x5207;&#x6362;&#x5230;&#x65B0;&#x8DEF;&#x7531;&#x65F6;&#xFF0C;&#x60F3;&#x8981;&#x9875;&#x9762;&#x6EDA;&#x5230;&#x9876;&#x90E8;&#xFF0C;&#x6216;&#x8005;&#x662F;&#x4FDD;&#x6301;&#x539F;&#x5148;&#x7684;&#x6EDA;&#x52A8;&#x4F4D;&#x7F6E;&#xFF0C;&#x5C31;&#x50CF;&#x91CD;&#x65B0;&#x52A0;&#x8F7D;&#x9875;&#x9762;&#x90A3;&#x6837;&#x3002;</p>
<pre><code class="lang-xml">&#x8FD9;&#x4E2A;&#x529F;&#x80FD;&#x53EA;&#x5728;&#x652F;&#x6301; history.pushState &#x7684;&#x6D4F;&#x89C8;&#x5668;&#x4E2D;&#x53EF;&#x7528;&#x3002;
&#x5F53;&#x4E14;&#x4EC5;&#x5F53; popstate &#x5BFC;&#x822A; (&#x901A;&#x8FC7;&#x6D4F;&#x89C8;&#x5668;&#x7684; &#x524D;&#x8FDB;/&#x540E;&#x9000; &#x6309;&#x94AE;&#x89E6;&#x53D1;) &#x65F6;&#x624D;&#x53EF;&#x7528;&#x3002;

scrollBehavior (to, from, savedPosition) {
    // return &#x671F;&#x671B;&#x6EDA;&#x52A8;&#x5230;&#x54EA;&#x4E2A;&#x7684;&#x4F4D;&#x7F6E;
  }

&#x5982;&#x679C;&#x8FD4;&#x56DE;&#x4E00;&#x4E2A; falsy &#x7684;&#x503C;&#xFF0C;&#x6216;&#x8005;&#x662F;&#x4E00;&#x4E2A;&#x7A7A;&#x5BF9;&#x8C61;&#xFF0C;&#x90A3;&#x4E48;&#x4E0D;&#x4F1A;&#x53D1;&#x751F;&#x6EDA;&#x52A8;&#x3002;
</code></pre>
<h2 id="&#x8DEF;&#x7531;&#x61D2;&#x52A0;&#x8F7D;"><a name="&#x8DEF;&#x7531;&#x61D2;&#x52A0;&#x8F7D;" class="anchor-navigation-ex-anchor" href="#&#x8DEF;&#x7531;&#x61D2;&#x52A0;&#x8F7D;"><i class="fa fa-link" aria-hidden="true"></i></a>1.15. &#x8DEF;&#x7531;&#x61D2;&#x52A0;&#x8F7D;</h2>
<p>&#x5982;&#x679C;&#x4E0D;&#x7528;&#x61D2;&#x52A0;&#x8F7D;&#xFF0C;&#x4F1A;&#x5C06;&#x6240;&#x6709;&#x6A21;&#x5757;&#x6253;&#x5305;&#x5728;&#x4E00;&#x8D77;&#xFF0C;&#x5F53;&#x8FD9;&#x4E2A;&#x5305;&#x5F88;&#x5927;&#x65F6;&#x4F1A;&#x5F71;&#x54CD;&#x52A0;&#x8F7D;&#x901F;&#x5EA6; &#x3002;&#x5982;&#x679C;&#x628A;&#x4E0D;&#x540C;&#x8DEF;&#x7531;&#x5BF9;&#x5E94;&#x7684;&#x7EC4;&#x4EF6;&#x5206;&#x5272;&#x6210;&#x4E0D;&#x540C;&#x7684;&#x4EE3;&#x7801;&#x5757;&#xFF0C;&#x7136;&#x540E;&#x5F53;&#x8DEF;&#x7531;&#x88AB;&#x8BBF;&#x95EE;&#x7684;&#x65F6;&#x5019;&#x624D;&#x52A0;&#x8F7D;&#x5BF9;&#x5E94;&#x7EC4;&#x4EF6;&#xFF0C;&#x8FD9;&#x6837;&#x4F1A;&#x63D0;&#x9AD8;&#x52A0;&#x8F7D;&#x901F;&#x5EA6;&#x3002;</p>
<pre><code class="lang-xml">&#x5728; Webpack 2 &#x4E2D;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x52A8;&#x6001; import&#x8BED;&#x6CD5;&#x6765;&#x5B9A;&#x4E49;&#x4EE3;&#x7801;&#x5206;&#x5757;&#x70B9; (split point)&#xFF1A;
const Foo = () =&gt; import(&apos;./Foo.vue&apos;)
const Bar = () =&gt; import(&apos;./Bar.vue&apos;)
</code></pre>
<h2 id="&#x5176;&#x4ED6;&#x76F8;&#x5173;"><a name="&#x5176;&#x4ED6;&#x76F8;&#x5173;" class="anchor-navigation-ex-anchor" href="#&#x5176;&#x4ED6;&#x76F8;&#x5173;"><i class="fa fa-link" aria-hidden="true"></i></a>1.16. &#x5176;&#x4ED6;&#x76F8;&#x5173;</h2>
<p>&#x4E0B;&#x9762;&#x8FD9;&#x4E9B;&#x914D;&#x7F6E; &#x6211;&#x6CA1;&#x6709;&#x5728;&#x6587;&#x6863;&#x4E2D;&#x627E;&#x5230;&#x76F8;&#x5173;&#x8BF4;&#x660E;&#xFF0C;&#x4F46;&#x662F;&#x67D0;&#x4E9B;&#x4EE3;&#x7801;&#x4E2D;&#x7528;&#x5230;&#x4E86;&#xFF0C;&#x8FD8;&#x4E0D;&#x592A;&#x4E86;&#x89E3;&#x673A;&#x5236;</p>
<pre><code class="lang-xml">hidden: true  ?
component  //&#x9700;&#x8981;&#x663E;&#x793A;&#x7684;&#x7EC4;&#x4EF6;  ?
children // &#x5B50;&#x8DEF;&#x7531;&#x914D;&#x7F6E;  ?
hidden   // ?

$router.options.routes
&#x83B7;&#x53D6;&#x5230;&#x8DEF;&#x7531;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E2D;&#x7684;&#x90A3;&#x4E2A;&#x6570;&#x7EC4;&#x3002;
</code></pre>
<footer class="page-footer"><span class="copyright">&#x65E0;&#x7248;&#x6743; &#x53EF;&#x4EE5;&#x65E0;&#x9650;&#x5236;&#x4F7F;&#x7528;&#xFF01; all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x66F4;&#x65B0;&#x65F6;&#x95F4;&#xFF1A;
2018-11-08 09:51:22
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="Vuex.html" class="navigation navigation-prev " aria-label="Previous page: Vuex">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="vue-i18n.html" class="navigation navigation-next " aria-label="Next page: vue-i18n">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"vue-router","level":"1.3.12","depth":2,"next":{"title":"vue-i18n","level":"1.3.13","depth":2,"path":"chinese/web/vue-i18n.md","ref":"chinese/web/vue-i18n.md","articles":[]},"previous":{"title":"Vuex","level":"1.3.11","depth":2,"path":"chinese/web/Vuex.md","ref":"chinese/web/Vuex.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-search","search-plus","todo","anchor-navigation-ex","copy-code-button","fontsettings","tbfed-pagefooter","donate","local-video","splitter","favicon","theme-comscore","local-video"],"styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"无版权 可以无限制使用！","modify_label":"该文件更新时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"todo":{},"splitter":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"donate":{"alipay":"http://oyru0ayig.bkt.clouddn.com/201803011956_osChina_支付宝收款码.png","alipayText":"支付宝打赏","button":"打赏","title":"","wechat":"http://oyru0ayig.bkt.clouddn.com/201803011956_osChina_微信收款码.png","wechatText":"微信打赏"},"fontsettings":{"family":"sans","size":2,"theme":"sepia"},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"favicon":{"shortcut":"assets/images/favicon.ico","bookmark":"assets/images/favicon.ico"},"theme-comscore":{},"local-video":{},"copy-code-button":{},"sharing":{"all":["facebook","google","twitter","weibo","instapaper"],"facebook":true,"google":false,"instapaper":false,"twitter":true,"vk":false,"weibo":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"search-plus":{}},"theme":"default","author":"Aivin","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Aivin开发笔记","language":"zh-hans","gitbook":"*","description":"Aivin开发笔记"},"file":{"path":"chinese/web/vue-router.md","mtime":"2018-11-08T01:51:22.825Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-04-12T07:42:16.699Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-local-video/video.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

